home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / ECCMD.C < prev    next >
C/C++ Source or Header  |  1988-02-16  |  755b  |  30 lines

  1. #include "global.h"
  2. #include "mbuf.h"
  3. #include "iface.h"
  4. #include "ec.h"
  5. int
  6. doetherstat(argc,argv)
  7. int argc;
  8. char *argv[];
  9. {
  10.     register struct ec *ecp;
  11.     char buf[20];
  12.  
  13.     for(ecp = ec;ecp < &ec[nec]; ecp++){
  14.         pether(buf,ecp->iface->hwaddr);
  15.         printf("Controller %u, Ethernet address %s\n",ecp-ec,buf);
  16.  
  17.         printf("recv      bad       overf     drop      nomem     intrpt\n");
  18.         printf("%-10lu%-10lu%-10lu%-10lu%-10lu%-10lu\n",
  19.          ecp->estats.recv,ecp->estats.bad,ecp->estats.over,
  20.          ecp->estats.drop,ecp->estats.nomem,ecp->estats.intrpt);
  21.  
  22.         printf("xmit      timeout   jam       jam16\n");
  23.         printf("%-10lu%-10lu%-10lu%-10lu\n",
  24.          ecp->estats.xmit,ecp->estats.timeout,ecp->estats.jam,
  25.          ecp->estats.jam16);
  26.     }
  27.     return 0;
  28. }
  29.  
  30.